package com.myjoje.bean.system;

import com.myjoje.base.BaseUuidBean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 菜单
 */
@Entity
@Table(name = "sy_menu")
public class MenuBean extends BaseUuidBean {

    //显示
    public final static String STATUS_SHOW = "1";
    //隐藏
    public final static String STATUS_HIDE = "0";

    @Column(columnDefinition = "varchar(40) COMMENT '菜单名称'")
    private String name;

    @Column(columnDefinition = "varchar(40) COMMENT '菜单地址'")
    private String url;

    @Column(columnDefinition = "varchar(40) COMMENT '父id'")
    private String parentId;

    @Column(columnDefinition = "varchar(40) COMMENT '菜单图标'")
    private String icon;

    @Column(columnDefinition = "varchar(40) COMMENT '优先级，数字越小优先级越高'")
    private String priority;

    @Column(columnDefinition = "varchar(40) COMMENT '菜单状态0-隐藏，1-显示'")
    private String status;

    @Column(columnDefinition = "varchar(40) COMMENT '菜单标志，用于多个系统'")
    private String flag;

    @Transient
    private Boolean hasChildren;

    @Transient
    private Object children;


    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public Object getChildren() {
        return children;
    }

    public void setChildren(Object children) {
        this.children = children;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getPriority() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority = priority;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Boolean getHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }
}
